package com.castle.fortress.admin.cms.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 标签分组
 * @author  castle
 */
@Getter
@AllArgsConstructor
public enum TagGroupEnum {

    BASIC(1,"基础配置","基础配置"),
    THUMBNAIL(2,"缩略图配置","缩略图配置"),
    ;

    Integer code;
    String name;
    String desc;

    public static String getNameByCode(Integer code){
        for(TagGroupEnum e: TagGroupEnum.values()){
            if(e.getCode().equals(code)){
                return e.getName();
            }
        }
        return null;
    }
}
